package domain;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by qq65827 on 2014/8/19.
 */
@Entity
@Table(name = "bloodfat", schema = "", catalog = "healthy")
public class BloodfatEntity {
    private long id;
    private Timestamp createTime;
    private byte isDelete;
    private Timestamp inputDate;

    @Id
    @Column(name = "id", nullable = false, insertable = true, updatable = true)
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "createTime", nullable = true, insertable = true, updatable = true)
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "isDelete", nullable = false, insertable = true, updatable = true)
    public byte getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(byte isDelete) {
        this.isDelete = isDelete;
    }

    @Basic
    @Column(name = "inputDate", nullable = true, insertable = true, updatable = true)
    public Timestamp getInputDate() {
        return inputDate;
    }

    public void setInputDate(Timestamp inputDate) {
        this.inputDate = inputDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BloodfatEntity that = (BloodfatEntity) o;

        if (id != that.id) return false;
        if (isDelete != that.isDelete) return false;
        if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false;
        if (inputDate != null ? !inputDate.equals(that.inputDate) : that.inputDate != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (id ^ (id >>> 32));
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (int) isDelete;
        result = 31 * result + (inputDate != null ? inputDate.hashCode() : 0);
        return result;
    }
}
